
<%@ page contentType="text/html;charset=UTF-8" %>
<sec:ifLoggedIn>
  <ul>
      <sec:ifAnyGranted roles="ROLE_ADMIN,ROLE_ATENDENTE">
        <li onclick="location.href='${createLink(controller:'pessoa', action:'index')}';">Principal</li>
      </sec:ifAnyGranted>

      <sec:ifAnyGranted roles="ROLE_ESTAGIARIO">
        <li onclick="location.href='${createLink(controller:'estagiario', action:'index')}';">Principal</li>
        <li onclick="location.href='${createLink(controller:'estagiario', action:'edit')}';">Meus dados</li>
      </sec:ifAnyGranted>

      <sec:ifAnyGranted roles="ROLE_IE">
        <li onclick="location.href='${createLink(controller:'instituicaoEnsino', action:'index')}';">Principal</li>
        <li onclick="location.href='${createLink(controller:'instituicaoEnsino', action:'edit')}';">Meus dados</li>
      </sec:ifAnyGranted>

      <sec:ifAnyGranted roles="ROLE_ADMIN,ROLE_ATENDENTE,ROLE_IE">
        <li>Cadastros
          <ul class="cadastros">
              <sec:ifAnyGranted roles="ROLE_ADMIN,ROLE_ATENDENTE">
                <sec:ifAnyGranted roles="ROLE_ADMIN">
                  <li onclick="location.href='${createLink(controller:'pessoa', action:'list')}';">Usuários</li>
                  <li onclick="location.href='${createLink(controller:'requestmap', action:'list')}';">RequestMaps</li>
                  <li onclick="location.href='${createLink(controller:'agenteIntegracao', action:'list')}';">Agente de Integração</li>
                </sec:ifAnyGranted>
                <li onclick="location.href='${createLink(controller:'formaPagamento', action:'create')}';">Formas de Pagamento</li>
                <li onclick="location.href='${createLink(controller:'estado', action:'create')}';">Estados</li>
                <li onclick="location.href='${createLink(controller:'cidade', action:'create')}';">Cidades</li>
                <li onclick="location.href='${createLink(controller:'beneficio', action:'create')}';">Beneficios</li>
                <li onclick="location.href='${createLink(controller:'atividade', action:'create')}';">Atividades</li>
                <li onclick="location.href='${createLink(controller:'nivelEnsino', action:'create')}';">Niveis de Ensino</li>
                <li onclick="location.href='${createLink(controller:'tcePagamento', action:'index')}';">Pagamentos</li>
              </sec:ifAnyGranted>
              <li onclick="location.href='${createLink(controller:'curso', action:'create')}';">Cursos</li>
          </ul>
        </li>
      </sec:ifAnyGranted>


      <sec:ifAnyGranted roles="ROLE_UC">
        <li onclick="location.href='${createLink(controller:'unidadeConcedente', action:'index')}';">Principal</li>
        <li onclick="location.href='${createLink(controller:'unidadeConcedente', action:'edit')}';">Meus dados</li>        
      </sec:ifAnyGranted>

      <sec:ifAnyGranted roles="ROLE_ADMIN,ROLE_ATENDENTE">
        <li>Moderações
            <ul class="moderacao">
                <li onclick="location.href='${createLink(controller:'estagiario', action:'list')}';">Estagiários</li>
                <li onclick="location.href='${createLink(controller:'unidadeConcedente', action:'list')}';">Unidade Concedente</li>
                <li onclick="location.href='${createLink(controller:'instituicaoEnsino', action:'list')}';">Instituição de Ensino</li>
                <li onclick="location.href='${createLink(controller:'vaga', action:'listaVagasInativas')}';">Vagas</li>
            </ul>
        </li>
        <li onclick="location.href='${createLink(controller:'solicitacao', action:'list')}';">Solicitações</li>
        <li onclick="location.href='${createLink(controller:'tce', action:'list')}';">TCEs</li>
      </sec:ifAnyGranted>

      <sec:ifAnyGranted roles="ROLE_UC">
        <li onclick="location.href='${createLink(controller:'vaga', action:'list')}';">Vagas</li>
      </sec:ifAnyGranted>

      <sec:ifAnyGranted roles="ROLE_ESTAGIARIO">
        <li onclick="location.href='${createLink(controller:'vaga', action:'pesquisar')}';">Pesquisar Vagas</li>
        <li onclick="location.href='${createLink(controller:'tcePagamento', action:'listPgtoEstagiario')}';">Pagamentos</li>
      </sec:ifAnyGranted>
      <sec:ifAnyGranted roles="ROLE_UC">
        <li onclick="location.href='${createLink(controller:'tcePagamento', action:'listPgtoUC')}';">Pagamentos</li>
      </sec:ifAnyGranted>
      <sec:ifAnyGranted roles="ROLE_ADMIN,ROLE_ATENDENTE">
        <li>Relatórios
          <ul class="moderacao">
            <li onclick="location.href='${createLink(controller:'relatorio', action:'controleConvenio')}';">Convênios</li>
            <li onclick="location.href='${createLink(controller:'relatorio', action:'controleTCE')}';">TCE</li>
          </ul>
        </li>
      </sec:ifAnyGranted>
  </ul>
</sec:ifLoggedIn>